import { requestAjax } from './http'

export interface RouteVO {
  _id: string
  name: string
  routeName: string
  code: string
  parentCode: string
  icon: string
  type: 'menu' | 'action'
}

export function getPubAdminRouteListAll (params?: any) {
 console.log(params);
  const res = {
    "code": 200,
    "status": 200,
    "data": [
        {
            "_id": "68b5df688c329572c5e3a950",
            "name": "首页",
            "code": "homeList",
            "routeName": "HomeList",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-home",
            "sort": 100,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a952",
            "name": "示例一（编辑模式）",
            "code": "demoOne",
            "routeName": "",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-feedback",
            "sort": 10000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a958",
            "name": "示例二（页面模式）",
            "code": "demoTwo",
            "routeName": "",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-feedback",
            "sort": 10000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95e",
            "name": "示例三（弹窗模式）",
            "code": "demoThree",
            "routeName": "",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-feedback",
            "sort": 10000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a964",
            "name": "示例四（抽屉模式）",
            "code": "demoFour",
            "routeName": "",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-feedback",
            "sort": 10000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a953",
            "name": "列表",
            "code": "demoOneList",
            "routeName": "DemoOneList",
            "parentCode": "demoOne",
            "type": "menu",
            "icon": "",
            "sort": 10100,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a959",
            "name": "列表",
            "code": "demoTwoList",
            "routeName": "DemoTwoList",
            "parentCode": "demoTwo",
            "type": "menu",
            "icon": "",
            "sort": 10200,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95f",
            "name": "列表",
            "code": "demoThreeList",
            "routeName": "DemoThreeList",
            "parentCode": "demoThree",
            "type": "menu",
            "icon": "",
            "sort": 10200,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a965",
            "name": "列表",
            "code": "demoFourList",
            "routeName": "DemoFourList",
            "parentCode": "demoFour",
            "type": "menu",
            "icon": "",
            "sort": 10200,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96b",
            "name": "用户管理",
            "code": "userManageList",
            "routeName": "UserManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20100,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96f",
            "name": "角色管理",
            "code": "roleManageList",
            "routeName": "RoleManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20200,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a954",
            "name": "新增",
            "code": "demoOneActionInsert",
            "routeName": "",
            "parentCode": "demoOneList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95a",
            "name": "新增",
            "code": "DemoTwoAdd",
            "routeName": "DemoTwoAdd",
            "parentCode": "demoTwoList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a960",
            "name": "新增",
            "code": "demoThreeActionInsert",
            "routeName": "",
            "parentCode": "demoThreeList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a966",
            "name": "新增",
            "code": "demoFourActionInsert",
            "routeName": "",
            "parentCode": "demoFourList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96c",
            "name": "新增",
            "code": "userManageActionInsert",
            "routeName": "",
            "parentCode": "userManageList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a970",
            "name": "新增",
            "code": "roleManageActionInsert",
            "routeName": "",
            "parentCode": "roleManageList",
            "type": "action",
            "icon": "",
            "sort": 20201,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a955",
            "name": "删除",
            "code": "demoOneActionDelete",
            "routeName": "",
            "parentCode": "demoOneList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95b",
            "name": "删除",
            "code": "demoTwoActionDelete",
            "routeName": "",
            "parentCode": "demoTwoList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a961",
            "name": "删除",
            "code": "demoThreeActionDelete",
            "routeName": "",
            "parentCode": "demoThreeList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a967",
            "name": "删除",
            "code": "demoFourActionDelete",
            "routeName": "",
            "parentCode": "demoFourList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96d",
            "name": "删除",
            "code": "userManageActionDelete",
            "routeName": "",
            "parentCode": "userManageList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a971",
            "name": "删除",
            "code": "roleManageActionDelete",
            "routeName": "",
            "parentCode": "roleManageList",
            "type": "action",
            "icon": "",
            "sort": 20202,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a956",
            "name": "编辑",
            "code": "demoOneActionUpdate",
            "routeName": "",
            "parentCode": "demoOneList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95c",
            "name": "编辑",
            "code": "DemoTwoEdit",
            "routeName": "DemoTwoEdit",
            "parentCode": "demoTwoList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a962",
            "name": "编辑",
            "code": "demoThreeActionUpdate",
            "routeName": "",
            "parentCode": "demoThreeList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a968",
            "name": "编辑",
            "code": "demoFourActionUpdate",
            "routeName": "",
            "parentCode": "demoFourList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96e",
            "name": "编辑",
            "code": "userManageActionUpdate",
            "routeName": "",
            "parentCode": "userManageList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a972",
            "name": "编辑",
            "code": "roleManageActionUpdate",
            "routeName": "",
            "parentCode": "roleManageList",
            "type": "action",
            "icon": "",
            "sort": 20203,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a957",
            "name": "详情",
            "code": "DemoOneDetails",
            "routeName": "DemoOneDetails",
            "parentCode": "demoOneList",
            "type": "action",
            "icon": "",
            "sort": 20204,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a95d",
            "name": "详情",
            "code": "DemoTwoDetails",
            "routeName": "DemoTwoDetails",
            "parentCode": "demoTwoList",
            "type": "action",
            "icon": "",
            "sort": 20204,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a963",
            "name": "详情",
            "code": "demoThreeActionView",
            "routeName": "",
            "parentCode": "demoThreeList",
            "type": "action",
            "icon": "",
            "sort": 20204,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a969",
            "name": "详情",
            "code": "demoFourActionView",
            "routeName": "",
            "parentCode": "demoFourList",
            "type": "action",
            "icon": "",
            "sort": 20204,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a973",
            "name": "权限管理",
            "code": "permissionsManageList",
            "routeName": "PermissionsManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20300,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a974",
            "name": "新增",
            "code": "permissionsManageActionInsert",
            "routeName": "",
            "parentCode": "permissionsManageList",
            "type": "action",
            "icon": "",
            "sort": 20301,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a975",
            "name": "删除",
            "code": "permissionsManageActionDelete",
            "routeName": "",
            "parentCode": "permissionsManageList",
            "type": "action",
            "icon": "",
            "sort": 20302,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a976",
            "name": "编辑",
            "code": "permissionsManageActionUpdate",
            "routeName": "",
            "parentCode": "permissionsManageList",
            "type": "action",
            "icon": "",
            "sort": 20303,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a977",
            "name": "路由管理",
            "code": "routeManageList",
            "routeName": "RouteManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20400,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a978",
            "name": "新增",
            "code": "routeManageActionInsert",
            "routeName": "",
            "parentCode": "routeManageList",
            "type": "action",
            "icon": "",
            "sort": 20401,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a979",
            "name": "删除",
            "code": "routeManageActionDelete",
            "routeName": "",
            "parentCode": "routeManageList",
            "type": "action",
            "icon": "",
            "sort": 20402,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97a",
            "name": "编辑",
            "code": "routeManageActionUpdate",
            "routeName": "",
            "parentCode": "routeManageList",
            "type": "action",
            "icon": "",
            "sort": 20403,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97b",
            "name": "数据字典",
            "code": "dictManageList",
            "routeName": "DictManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20500,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97c",
            "name": "数据配置",
            "code": "dictDataList",
            "routeName": "DictDataList",
            "parentCode": "dictManageList",
            "type": "action",
            "icon": "",
            "sort": 20501,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97d",
            "name": "新增",
            "code": "dictManageActionInsert",
            "routeName": "",
            "parentCode": "dictManageList",
            "type": "action",
            "icon": "",
            "sort": 20503,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97e",
            "name": "删除",
            "code": "dictManageActionDelete",
            "routeName": "",
            "parentCode": "dictManageList",
            "type": "action",
            "icon": "",
            "sort": 20504,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a97f",
            "name": "编辑",
            "code": "dictManageActionUpdate",
            "routeName": "",
            "parentCode": "dictManageList",
            "type": "action",
            "icon": "",
            "sort": 20505,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a980",
            "name": "系统日志",
            "code": "logManageList",
            "routeName": "LogManageList",
            "parentCode": "systemManage",
            "type": "menu",
            "icon": "",
            "sort": 20600,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a96a",
            "name": "系统管理",
            "code": "systemManage",
            "routeName": "",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-setting",
            "sort": 30000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        },
        {
            "_id": "68b5df688c329572c5e3a951",
            "name": "关于我们",
            "code": "aboutUs",
            "routeName": "AboutUs",
            "parentCode": "",
            "type": "menu",
            "icon": "vxe-icon-chat",
            "sort": 100000,
            "createTime": "2025-09-01T18:01:12.596Z",
            "updateTime": "2025-09-01T18:01:12.596Z",
            "createBy": "",
            "updateBy": ""
        }
    ],
    "msg": ""
};
  return Promise.resolve(res);
}

export function postPubAdminRouteSaveBatch (data?: any) {
  return requestAjax({
    url: '/api/pub/admin/route/save/batch',
    method: 'post',
    data
  })
}

export function deletePubAdminRouteDelete (data?: any) {
  return requestAjax({
    url: '/api/pub/admin/route/delete',
    method: 'delete',
    data
  })
}
